import { _decorator, Component, Node } from 'cc';
import { Globals } from './Globals';
const { ccclass, property } = _decorator;

@ccclass('IceBlock')
export class IceBlock extends Component {
    hurt = 5; // 伤害
    // 持续时间
    duration = 3;
    start() {

    }

    update(deltaTime: number) {
        // 持续时间减少
        this.duration -= deltaTime;
        if (this.duration < 0) {
            Globals.putNode(this.node);
        }
    }
}


